{% form_theme form 'form/no-label-field-1.html.twig' %}

<div class="modal fade" id="messageModal{{ modalId }}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            {{ form_start(form, {attr: {class: 'form-horizontal', id: 'messageForm', action: path('send_message')}}) }}

            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">{{ title }}</h4>
            </div>
            <div class="modal-body">
                {{ form_widget(form) }}
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="submit" class="btn btn-success">发送</button>
            </div>
            {{ form_end(form) }}
        </div>
    </div>
</div>